<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>购物车</title>
    <link rel="stylesheet" type="text/css" href="../css/shopCart.css">
</head>
<body>
    <header></header>
    <section>
        <div class="wrap">
            <div class="title">
                <img src="../images/shop_ico.gif" alt="">
                <h2>我的购物车</h2>
            </div>
            <div class="shopping" id="shopCart">
                <table cellspacing="0" cellpadding="0">
                    <thead class="thead">
                        <tr>
                            <th width="130px">
                                <a href="javascript:;">编辑</a>
                                <input type="checkbox" id="all-check">
                            </th>
                            <th width="480px">商品名称</th>
                            <th width="110px">价格</th>
                            <th width="260px">购买数量</th>
                            <th width="110px">小计</th>
                            <th width="110px">操作</th>
                        </tr>
                    </thead>
                    <tbody class="shop_tbody" id="shop_tbody">
                        
                    </tbody>
                    <tfoot class="shop_tfoot">
                        <tr>
                            <td>
                                <span>商品总计：</span>
                                <span class="paymoney">￥</span>
                                <span id="Paymoney" class="paymoney"></span>
                            </td>
                            <td>
                                <a href="javascript:;">去结算</a>
                                <a href="/html/list.html?id=1754">继续购物</a>
                            </td>
                        </tr>
                    </tfoot>
                </table>
                <script type="text/html" id="cartTemplate">
                    {{each cart shop}}
                    <tr data-id="{{shop.id}}">
                      <td>
                        <label class="check-label">
                          <input type="checkbox" class="checks" {{ shop.check ? 'checked' : '' }}/>
                        </label>
                      </td>
                      <td>
                        <a href="/html/detail.html?id={{shop.id}}">
                          <img src="{{shop.photo[0].url}}" alt="">
                        </a>
                        <span>{{shop.title.slice(0,18) + '...'}}</span>
                      </td>
                      <td>
                        <span>{{shop.price}}</span>
                      </td>
                      <td>
                        <a href="javaScript:;" class="minus"><img src="../images/jian_ico.jpg" alt=""></a>
                        <input type="text" value="{{shop.count}}" class='shopCarNum'>
                        <a href="javaScript:;" class="plus"><img src="../images/jia_ico.jpg" alt=""></a>
                      </td>
                      <td>{{(shop.price*shop.count).toFixed(2)}}</td>
                      <td><span class='shopDel'>删除</span></td>
                    </tr>
                    {{/each}}
                  </script>
            </div>
            <div class="empty" id="cart-empty">
              <p><i><img src="../images/shop_ico.gif" alt=""></i>&nbsp;您的购物车还没有商品!</p>
              <div>
                <a href="/index.html">返回首页</a>
                <a href="/html/list.html?id=1754">挑选商品</a>
              </div>
          </div>
        </div>
    </section>
    <footer></footer>
    <script src="/libs/require/require.min.js" data-main="/js/shopCart"></script>
</body>
</html>